import React, {render, Component} from './react'

const dom = document.getElementById('root')

const jsx = (
    <div>
        <span>123</span>
        <p>333</p>
    </div>
)

 render(jsx, dom)


setTimeout(() => {
  const jsx = (
    <div>
      <div>奥利给</div>
    </div>
  )
  render(jsx, root)
}, 2000)


// class Greating extends Component {
//     constructor(props) {
//       super(props)
//       this.state = {
//         name: "张三"
//       }
//     }
//     render() {
//       return (
//         <div>
//           {this.props.title}hahahaha {this.state.name}
//           <button onClick={() => this.setState({ name: "李四" })}>button</button>
//           <FnComponent title='hello' />
//         </div>
//       )
//     }
// }

// render(<Greating />, dom)

// function FnComponent(props) {
//     return <div>{props.title}FnComponent</div>
// }

// render(<FnComponent title='hello' />, dom)
  